<div id="content">
	<div class="padded">
		<form action="editPost" method="post" id="editPostForm">
			<input type="hidden" name="postID" value="<?=$post->getPostID();?>"/>
			<table>
				<tr>
					<td>Title:</td>
					<td><input type="text" name="title" value="<?=$post->getTitle();?>" size="50"/></td>
				</tr>
				<tr>
					<td>Date:</td>
					<td><input type="text" name="date" value="<?=$post->getDate()->toMySQLStr();?>"/></td>
				<tr>
					<td class="top">Content:</td>
					<td><textarea name="content" rows="10" cols="80"><?=htmlentities($post->getContent());?></textarea></td>
				</tr>
				<tr>
					<td class="top">Labels:</td>
					<td id="labels">
					<? foreach ($labels as $label) { ?>
						<div>
							<input type="checkbox" name="labelIDs[]" id="label<?=$label->getLabelID();?>" value="<?=$label->getLabelID();?>"<? if (in_array($label->getLabelID(), $post->getLabelIDs())) echo " checked=\"checked\""; ?>/>
							<label for="label<?=$label->getLabelID();?>"><?=$label->getLabel();?></label>
						</div>
					<? } ?>
						<input type="button" id="createLabel" value="Create Label"/>
					</td>
				</tr>
				<tr>
					<td colspan="2" class="right">
						<input type="submit" name="preview" value="Preview"/>
						<input type="submit" name="save" value="Save"/>
					</td>
				</tr>
			</table>
		</form>
	</div>
	<hr/>
	<div id="postPadding">
	<?
	$this->loadView("ericdingle/view/post.php", array(
		"post" => $post,
		"labels" => $labels
	));
	?>
	</div>
</div>
